<template>
	<view class="content" v-if="pageShow">
		<view class="nav">
			<view class="">{{info.des}}</view>
		</view>
		<view class="padding">
			<u-parse :content="info.content"></u-parse>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				id:"",
				info:{},
				pageShow:false
			}
		},
		onLoad(options) {
			this.id=options.id
			this.init()
		},
		methods: {
			init(){
				let _this = this
				httpRequest.request('/api/user/systemnoticeDetail', 'GET', {
					id: _this.id,
				}).then(res => {
					if (res.code == 1) {
						_this.info=res.data
						_this.pageShow=true
					} else if (res.code == 0) {
						httpRequest.toast(res.msg);
						setTimeout(()=>{
							uni.navigateBack(1)
						},500)
					} else {
						httpRequest.toast('网络开小差啦');
					}
				}).catch(err => {
					httpRequest.toast(err.msg);
				})
			}
		}
	}
</script>

<style>
.nav{
	padding: 50rpx;
	font-size: 30rpx;
	font-family: PingFang SC-Medium, PingFang SC;
	font-weight: 500;
	color: #666666;
}
</style>
